Optimal. Leaf size=26 \[ -\frac {i a \cos (c+d x)}{d}+\frac {a \sin (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {3567, 2717}
\begin {gather*} \frac {a \sin (c+d x)}{d}-\frac {i a \cos (c+d x)}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2717
Rule 3567
Rubi steps
\begin {align*} \int \cos (c+d x) (a+i a \tan (c+d x)) \, dx &=-\frac {i a \cos (c+d x)}{d}+a \int \cos (c+d x) \, dx\\ &=-\frac {i a \cos (c+d x)}{d}+\frac {a \sin (c+d x)}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 51, normalized size = 1.96 \begin {gather*} -\frac {i a \cos (c) \cos (d x)}{d}+\frac {a \cos (d x) \sin (c)}{d}+\frac {a \cos (c) \sin (d x)}{d}+\frac {i a \sin (c) \sin (d x)}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.20, size = 24, normalized size = 0.92
method | result | size |
risch | \(-\frac {i a \,{\mathrm e}^{i \left (d x +c \right )}}{d}\) | \(17\) |
derivativedivides | \(\frac {-i a \cos \left (d x +c \right )+a \sin \left (d x +c \right )}{d}\) | \(24\) |
default | \(\frac {-i a \cos \left (d x +c \right )+a \sin \left (d x +c \right )}{d}\) | \(24\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 22, normalized size = 0.85 \begin {gather*} \frac {-i \, a \cos \left (d x + c\right ) + a \sin \left (d x + c\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 15, normalized size = 0.58 \begin {gather*} -\frac {i \, a e^{\left (i \, d x + i \, c\right )}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.06, size = 26, normalized size = 1.00 \begin {gather*} \begin {cases} - \frac {i a e^{i c} e^{i d x}}{d} & \text {for}\: d \neq 0 \\a x e^{i c} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 84 vs. \(2 (24) = 48\).
time = 0.44, size = 84, normalized size = 3.23 \begin {gather*} -\frac {4 i \, a e^{\left (i \, d x + i \, c\right )} + a \log \left (i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) + a \log \left (i \, e^{\left (i \, d x + i \, c\right )} - 1\right ) - a \log \left (-i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) - a \log \left (-i \, e^{\left (i \, d x + i \, c\right )} - 1\right )}{4 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.28, size = 20, normalized size = 0.77 \begin {gather*} \frac {2\,a}{d\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1{}\mathrm {i}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________